<?php
if (isset($user)) {
    $usr['id'] = $user->UTILISATEUR_ID;
    $usr['name'] = $user->UTILISATEUR_NOM;
    $usr['surname'] = $user->UTILISATEUR_PRENOM;
    $usr['email'] = $user->UTILISATEUR_EMAIL;
} else {
    $usr['id'] = '';
    $usr['name'] = '';
    $usr['surname'] = '';
    $usr['email'] = '';
}
?>

<form>
    <input type="hidden" id="userId" value="<?php echo $usr['id']; ?>">
    
    <span class="error editName" style="display: none; color: red;"></span>
    <label for="editName">Nom :</label><input type="text" id="editName" value="<?php echo $usr['name']; ?>"/>

    <span class="error editSurname" style="display: none; color: red;"></span>
    <label for="editSurname">Prénom :</label><input type="text" id="editSurname" value="<?php echo $usr['surname']; ?>"/>

    <span class="error editEmail" style="display: none; color: red;"></span>
    <label for="editEmail">Email :</label><input type="email" id="editEmail"  value="<?php echo $usr['email']; ?>"/>
    
    <span class="error editPassword" style="display: none; color: red;"></span>
    <label for="editPassword">Mot de passe :</label><input type="password" id="editPassword" value=""/>

    <label for="editPasswordRe">Re- Mot de passe:</label><input type="password" id="editPasswordRe" value=""/>
</form>